﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<link rel="stylesheet" type="text/css" href="../JSSpec.css" />
<script type="text/javascript" src="../diff_match_patch.js"></script>
<script type="text/javascript" src="../JSSpec.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="../../javascripts/amplify/core.js"></script>
<script type="text/javascript" src="../../javascripts/amplify/adapters/jquery/system.js"></script>
<script type="text/javascript">// <![CDATA[
	describe('System Functionality', {
		'should validate types': function() {
			var temp = function() { }

			value_of(amp.isFunction(temp)).should_be(true);
			value_of(amp.isArray(["a", "b"])).should_be(true);
			value_of(amp.isString("test")).should_be(true);
			value_of(amp.isUndefined(typeof (bob))).should_be(true);
			value_of(amp.isNumber(10)).should_be(true);
		},
		'should create namespace ': function() {
			amp.namespace("Amp.Test");
			value_of(Amp.Test).should_be({ "__type": "Amp.Test", "__namespace": true });
		},
		'should create class with hierarchy': function() {
			amp.class("Amp.Test.Base", null, {
				getName: "bob",
				ctor: function() {
					this.age = 10;
				}
			});
			
			var base = new Amp.Test.Base();
			value_of(base).should_not_be(null);
			value_of(base.getName).should_be("bob");
			value_of(base.age).should_be(10);
			
			
			amp.class("Amp.Test.Control", Amp.Test.Base, {
				getName: "player"
			});
			
			var control = new Amp.Test.Control();
			value_of(control.getName).should_be("player");
			value_of(control.age).should_be(10);
			
			alert(amp.bind);
		}
	})

	
// ]]></script>
</head>
<body>
	<div style="display:none;"><p>A</p><p>B</p></div>

</body>
</html>
